<?php

namespace Database\Seeders;

use App\Models\Users;
use Illuminate\Database\Seeder;

class UsersSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //清空数据表
        Users::truncate();
        //添加模拟数据
        Users::factory()->count(100)->create();

        Users::where('id',1)->update(['username'=>'admin','type'=>2]);
    }
}
